/*
 * main.cpp
 *
 *  Created on: Apr 19, 2012
 *      Author: thuvh
 */

#include <iostream>

#include <vector>

#include "Symbol.h"
#include "NonTerminal.h"
#include "Terminal.h"

#include "Utils.h"

using namespace std;


int main(int argc, char * argv[]) {

	//loadFile("sample.chunk");
	string filename = "sample.rule";
	Symbol * rules = loadRuleFromFile(filename);
	cout << "end of loading " << endl;
//	Symbol * root = new NonTerminal("NP");
//	root->nonTerminal()->push_back(new Terminal("DT", "the"));
//	root->nonTerminal()->push_back(new Terminal("NN", "x"));
//
//	cout << root->isNonTerminal() << endl;
//	cout << root->nonTerminal()->sizeOfChildren() << endl;
//	cout << root->toString() << endl;
//
//	for (size_t ci = 0; ci < rules.size(); ci++){
//		bool b = isMatch(root, rules[ci]);
//		cout << "rule: " << rules[ci]->toString() <<  ", is match: " << b << endl;
//	}

	loadFile("sample.chunk", rules);

	cout << "Done!!!" << endl;
	return 0;
}

